#coding: utf-8

"""
下拉框操作
"""

import os, time
from selenium import webdriver

file_path = "file:///" + os.path.abspath("drop_down.html")

driver = webdriver.Chrome()

try:
	driver.get(file_path)
	
	# 先定位到下拉框
	driver.find_element_by_id("ShippingMethod")
	
	# 再点击下拉框下的选项
	driver.find_element_by_xpath("//option[@value='10.69']").click()
	print driver.page_source
	time.sleep(3)
except Exception as e:
	print e
finally:
	driver.quit()